#ifndef _CRENDER_H_
#define _CRENDER_H_

/*
The CRender class its a component of a game object wich tells the engine that its a movable node.
This may come as a tree, a rock, or a light.
It implements the CPosition and COrientation too.
*/

#include "GameComponentTemplate.h"
#include "Ogre.h"

using namespace Ogre;

class GameComponent;

class CRenderTemplate : public GameComponentTemplate {
public:
	//static Ogre::String meshFileName;
	Ogre::SceneNode *mNode;
	
	CRenderTemplate();
	~CRenderTemplate();

	virtual const comp_id_type& componentID() const {
		return mComponentID;
	}
	virtual const comp_id_type& familyID() const {
		return mFamilyID;
	}

	virtual GameComponent *makeComponent();

private:
	static comp_id_type mComponentID;
	static comp_id_type mFamilyID;
};

class CRender : public GameComponent {
public:
	//static Ogre::String meshFileName;
	Ogre::SceneNode *mNode;

	CRender();
	CRender(CRenderTemplate* ct);
	
	~CRender();

	void setup();
	void update();

	virtual const comp_id_type& familyID() const { return mFamilyID; }
	virtual const comp_id_type& componentID() const { return mComponentID; }
private:
	static comp_id_type mFamilyID;
	static comp_id_type mComponentID;
};

#endif
